﻿using System;
using System.Buffers;
using System.Text.Json;
using System.Text.Unicode;

namespace DemoConsoleApp
{
	class Program
	{
		static void Main(string[] args)
		{
			var foo = new Foo
			{
				Name = "张三丰",
				Remark = "武当",
				Data = new System.Collections.Generic.List<string> { "Red", "Green" }
			};

			var rs = JsonSerializer.Serialize(foo, new JsonSerializerOptions
			{
				WriteIndented = false,Encoder=System.Text.Encodings.Web.JavaScriptEncoder.Create(UnicodeRanges.All)
			}
			);
			Console.WriteLine(rs);

		}
	}
}
